package com.boot.mall.ware.feign;

import com.boot.common.to.order.OrderStatusTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("mall-order")
public interface OrderFeignService {

    /**
     * 查询订单的状态
     * @param orderSn
     * @return
     */
    @GetMapping("/order/order/status/{orderSn}")
    OrderStatusTo getOrderStatus(@PathVariable("orderSn") String orderSn);

    /**
     * 取消订单，将订单状态修改为取消
     * @return
     */
    @GetMapping("/order/order/status/cancel/{orderSn}")
    Boolean cancelOrder(@PathVariable("orderSn") String orderSn);

}
